******************************************************************************************
* copcosts.do
* Produces analysis of costs of worldwide MDG monitoring
* Gabriel Demombynes
******************************************************************************************

clear all
set more off

*  set locations of data and programs
global data "C:\Users\wb177071\Dropbox\Copenhagen\Data\Raw"
global programs "C:\Users\wb177071\Dropbox\Copenhagen\Data\Dofiles"

cd "$data"

use MDGcosts
sort pcgdp_cd
gen annualcosts=costs/25
gen cumannualcosts=sum(annualcosts)
twoway 	(line cumannualcosts pcgdp_cd if pcgdp_cd>200, sort lwidth(medthick)), 	///
		xscale(log) 											///
		xlab(1000 2000 5000 10000 20000 40000)					///
		$myregion $plotregion									///
		ytitle("Cumulative cost per annum, $ millions")			///
		xline(2000)

	 	graph export "$figures/costs2.pdf", as(pdf) replace
	
table region, c(sum annualcosts)


exit
